﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace wp8skinswitcher.Model
{
    public class PhoneSkin
    {
        public PhoneSkin(string title)
        {
            Title = title;
        }

        public string Title { get; set; }
        public string SubTitle { get; set; }
        public string Id { get; set; }
        public int X { get; set; }
        public int Y { get; set; }
        public string CreatorName { get; set; }
        public string CreatorLink { get; set; }
        public EmulatorType Type { get; set; }

        public string SkinUpUrl
        {
            get
            {
                return "/Assets/" + Id + "_Skin_Up_" + GetResolutionString() + ".png";
            }
        }

        public string SkinDownUrl
        {
            get
            {
                return "/Assets/" + Id + "_Skin_Down_" + GetResolutionString() + ".png";
            }
        }

        public string SkinMaskUrl
        {
            get
            {
                return "/Assets/" + Id + "_Skin_Mask_" + GetResolutionString() + ".png";
            }
        }

        public string GetResolutionString()
        {
            switch (Type)
            {
                case EmulatorType.wvga:
                default:
                    return "480x800";
                case EmulatorType.s720p:
                    return "720x1280";
                case EmulatorType.wxga:
                    return "768x1280";
            }
        }

    }

    public enum EmulatorType { wvga, wxga, s720p};
}
